package com.csw.shuanfa.SuanFa.huaWei;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author 1
 */
@Slf4j
public class BaseConversion {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            String input = sc.next();
            if (!input.startsWith("0x")) {
                break;
            }
            String ins = input.substring(2);
            /* 十进制转换到16进制 */
            list.add(Integer.parseInt(ins, 16));
            /* x.toHexString(x); */

        }
        for (Integer integer : list) {
            log.error("" + integer);
        }
    }
}
